import Vue from 'vue'
import Router from 'vue-router'
import Home from '../components/tabbar/Home.vue'
import Newslist from '../components/tabbar/Newslist.vue'
import Shopcar from '../components/tabbar/Shopcar.vue'
import Search from '../components/tabbar/Search.vue'
import Newsinfo from '../components/news/Newsinfo.vue'
import Goodsinfo from '../components/shop/Goodsinfo.vue'
import Godesc from '../components/shop/Godesc.vue'
import Gocomment from '../components/shop/Gocomment.vue'



Vue.use(Router)

export default new Router({
    mode: 'history',
    routes: [
        {
            path: '/',
            redirect: '/home'
        },
        {
            path: '/home',
            component: Home
        },
        {
            path: '/newslist',
            component: Newslist
        },
        {
            path: '/shopcar',
            component: Shopcar
        },
        {
            path: '/search',
            component: Search
        },
        {
            path:'/newslist/newsinfo/:id',
            component:Newsinfo
        },
        {
            path:'/home/goodsinfo/:id',
            component:Goodsinfo
        },
        {
            path:'/home/goodsinfo/godesc/:id',
            component:Godesc,
            name:'godesc'
        },
        {
            path:'/home/goodsinfo/gocomment/:id',
            component:Gocomment,
            name:'gocomment'
        }
    ],
    // 默认路由高亮的类mui-active
    linkActiveClass: 'mui-active'
})